package com.s63.ssm.service;

import com.s63.ssm.dao.RoleMapper;
import com.s63.ssm.entity.SysRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(readOnly = true)
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper roleMapper;

    public void setRoleMapper(RoleMapper roleMapper) {
        this.roleMapper = roleMapper;
    }

    @Override
    public List<SysRole> getAll() {
        return roleMapper.getAll();
    }

    @Override
    public List<SysRole> getPage(SysRole role) {
        return roleMapper.getPage(role);
    }
}
